package com.quan.weixin.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.quan.common.core.BaseService;
import com.quan.weixin.entity.WeixinSubscribeUser;
import com.quan.weixin.mapper.WeixinSubscribeUserMapper;
import com.quan.weixin.service.WeixinSubscribeUserService;

import tk.mybatis.mapper.entity.Condition;

@Service
public class WeixinSubscribeUserServiceImpl extends BaseService<WeixinSubscribeUser> implements WeixinSubscribeUserService {

	@Autowired
	private WeixinSubscribeUserMapper mapper ;
	
	@Override
	public void deleteByOpenId(String openid) {
		Condition condition = new Condition(WeixinSubscribeUser.class) ;
		condition.createCriteria().andEqualTo("openid", openid) ;
		this.mapper.deleteByCondition(condition) ;
	}

}
